package leetcode3;
import java.util.*;

public class Day9 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String str = in.nextLine();
            String[] s = str.split(" ");
            StringBuilder ret = new StringBuilder();
            for(String x:s) {
                ret.append(x.charAt(0));
            }
            System.out.println(ret.toString().toUpperCase());
        }
    }

    public static void main4(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            String[] strs = new String[n];
            String str1 = in.next();
            String str2 = in.next();
            for(int i=0;i<n;i++) {
                strs[i]=in.next();
            }
            int a=-1,b=-1,ret=Integer.MAX_VALUE;
            for(int i=0;i<n;i++) {
                if(strs[i].equals(str1)) {
                    a = i;
                }else if(strs[i].equals(str2)) {
                    b = i;
                }
                if(a!=-1 && b!=-1) {
                    ret = Math.min(ret,Math.abs(a-b));
                }
            }
            if(ret == Integer.MAX_VALUE) {
                System.out.println(-1);
            }else {
                System.out.println(ret);
            }

        }
    }

    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int[] cost = new int[n];
            for(int i=0;i<n;i++) cost[i] = in.nextInt();
            int[] dp = new int[n]; //到达i位置的最小花费
            for(int i=2;i<n;i++) {
                dp[i] = Math.min(dp[i-1]+cost[i-1],dp[i-2]+cost[i-2]);
            }
            System.out.println(Math.min(dp[n-1]+cost[n-1],dp[n-2]+cost[n-2]));
        }
    }


    public static void main2(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String s = in.nextLine();
            Stack<Character> stack = new Stack<>();
            for(int i=0;i<s.length();i++) {
                char ch = s.charAt(i);
                if(stack.isEmpty()) stack.add(ch);
                else {
                    if(stack.peek() == ch) stack.pop();
                    else stack.add(ch);
                }
            }
            StringBuilder str = new StringBuilder();
            while(!stack.isEmpty()) {
                str.append(stack.pop());
            }
            if(str.length()==0) {
                System.out.println("");
            }else {
                System.out.println(str.reverse().toString());
            }
        }
    }


    public ArrayList<Integer> intersection (ArrayList<Integer> nums1, ArrayList<Integer> nums2) {
        // write code here
        ArrayList<Integer> ret = new ArrayList<>();
        Set<Integer> set = new HashSet<>();
        boolean[] hash = new boolean[1001];
        for(int x:nums1) hash[x]=true;
        for(int x:nums2) {
            if(hash[x]) set.add(x);
        }
        for(int x:set) ret.add(x);
        return ret;
    }

    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int L = in.nextInt();
            int R = in.nextInt();
            int ret = 0;
            for(int i=L;i<=R;i++) {
                int tmp = i;
                while(tmp!=0) {
                    if(tmp%10==2) ret++;
                    tmp/=10;
                }
            }
            System.out.println(ret);
        }
    }
}
